.TH E1432_SET_TRIGGER_EXT 3 E1432
.SH NAME
.nf
e1432_set_trigger_ext \- Set external trigger mode
e1432_get_trigger_ext \- Get current external trigger mode
.fi
.IX e1432_set_trigger_ext(3) 3
.IX e1432_get_trigger_ext(3) 3
.SH SYNOPSIS
.cS
SHORTSIZ16 e1432_set_trigger_ext(E1432ID hw, SHORTSIZ16 ID,
                                 SHORTSIZ16 ext)
SHORTSIZ16 e1432_get_trigger_ext(E1432ID hw, SHORTSIZ16 ID,
                                 SHORTSIZ16 *ext)
.cE
.SH DESCRIPTION
Each E1432 has an external trigger input which can be used to pre-arm
and/or trigger a measurement.  This trigger input is not part of any
SCA, and is used only when there is no option 1D4 source board and no
option AYF tach/trigger board plugged into the rear connector of the
E1432.  This trigger input is a TTL input, so the trigger level can't
be adjusted for this input.

\fIe1432_set_trigger_ext\fR sets the external trigger mode for one or
more E1432 modules.

\fIe1432_get_trigger_ext\fR returns the current external trigger mode,
of a single channel or group of channels \fIID\fR, in the memory
location pointed to by \fIext\fR.

This parameter is a "global" parameter.  It applies to an entire E1432
module rather than to one of its channels.  The \fIID\fR parameter is
used only to identify which module the function applies to, and all
channels in that module will report the same value for this parameter.

\fIhw\fR must be the result of a successful call to
\fIe1432_assign_channel_numbers\fR, and specifies the group of
hardware to talk to.

\fIID\fR is either the ID of a group of channels that was obtained
with a call to \fIe1432_create_channel_group\fR, or the ID of a single
channel.

\fIext\fR specifies the external trigger mode for the modules referred
to by \fIID\fR.  The valid choices are:

\fBE1432_TRIGGER_EXT_OFF\fR, which disables the external trigger;

\fBE1432_TRIGGER_EXT_POS\fR, which enables the external trigger and
uses the positive edge of the trigger to pre-arm or trigger a
measurement;

\fBE1432_TRIGGER_EXT_NEG\fR, which enables the external trigger and
uses the negative edge of the trigger to pre-arm or trigger a
measurement;

\fBE1432_TRIGGER_EXT_PREARM_POS\fR, which enables the external trigger
for pre-arm, but not for triggering, and uses the positive edge of the
trigger to pre-arm the measurement;

\fBE1432_TRIGGER_EXT_PREARM_NEG\fR, which enables the external trigger
for pre-arm, but not for triggering, and uses the negative edge of the
trigger to pre-arm the measurement.

The last two "prearm" values are useful only if the pre-arm mode is
set to \fBE1432_ARM_EXTERNAL\fR, see \fIe1432_set_pre_arm_mode\fR for
details.

.SH "RESET VALUE"
After a reset, \fIext\fR is set to \fBE1432_TRIGGER_EXT_OFF\fR.
.SH "RETURN VALUE"
Return 0 if successful, a (negative) error number otherwise.
.SH "SEE ALSO"
.na
e1432_set_trigger_channel, e1432_set_trigger_slope,
e1432_set_pre_arm_mode
.ad
